﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace B.WMS.Migrations
{
    /// <inheritdoc />
    public partial class douziya : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "WMSDetailModel",
                columns: table => new
                {
                    Id = table.Column<Guid>(type: "uuid", nullable: false),
                    ReviewNo = table.Column<string>(type: "text", nullable: false),
                    GoodscodeNo = table.Column<string>(type: "text", nullable: false),
                    GoodscodeName = table.Column<string>(type: "character varying(128)", maxLength: 128, nullable: false),
                    Rqty = table.Column<decimal>(type: "numeric", nullable: false),
                    Ramout = table.Column<decimal>(type: "numeric", nullable: false),
                    Pqty = table.Column<decimal>(type: "numeric", nullable: false),
                    Unit = table.Column<string>(type: "text", nullable: false),
                    Dqty = table.Column<decimal>(type: "numeric", nullable: false),
                    Damount = table.Column<decimal>(type: "numeric", nullable: false),
                    Dstatus = table.Column<int>(type: "integer", nullable: false),
                    Dprice = table.Column<decimal>(type: "numeric", nullable: false),
                    Dremark = table.Column<string>(type: "text", nullable: false),
                    ExtraProperties = table.Column<string>(type: "text", nullable: false),
                    ConcurrencyStamp = table.Column<string>(type: "character varying(40)", maxLength: 40, nullable: false),
                    CreationTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
                    CreatorId = table.Column<Guid>(type: "uuid", nullable: true),
                    LastModificationTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: true),
                    LastModifierId = table.Column<Guid>(type: "uuid", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_WMSDetailModel", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "WMSReviewModel",
                columns: table => new
                {
                    Id = table.Column<Guid>(type: "uuid", nullable: false),
                    ReviewNo = table.Column<string>(type: "character varying(18)", maxLength: 18, nullable: false),
                    ReviewType = table.Column<string>(type: "text", nullable: false),
                    Warehouseid = table.Column<string>(type: "text", nullable: false),
                    StartTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
                    EndTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
                    UserId = table.Column<Guid>(type: "uuid", nullable: false),
                    Remark = table.Column<string>(type: "text", nullable: false),
                    Rstauts = table.Column<int>(type: "integer", nullable: false),
                    ExtraProperties = table.Column<string>(type: "text", nullable: false),
                    ConcurrencyStamp = table.Column<string>(type: "character varying(40)", maxLength: 40, nullable: false),
                    CreationTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
                    CreatorId = table.Column<Guid>(type: "uuid", nullable: true),
                    LastModificationTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: true),
                    LastModifierId = table.Column<Guid>(type: "uuid", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_WMSReviewModel", x => x.Id);
                });
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "WMSDetailModel");

            migrationBuilder.DropTable(
                name: "WMSReviewModel");
        }
    }
}
